<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <style>
        img{
            width: 600px;
            height: 400px;
        }
    </style>
</head>
<body>
        <div class="layui-row">
                <div class="layui-col-md9">
                    <div class="layui-card">
                        <div class="layui-card-header">轮播图片</div>
                        <div class="layui-card-body">
                                <div class="layui-carousel" id="test1">
                                        <div carousel-item>
                                            <div><img src="../img/1.jpeg" alt=""></div>
                                            <div><img src="../img/2.jpeg" alt=""></div>
                                            <div><img src="../img/3.jpeg" alt=""></div>
                                            <div><img src="../img/4.jpeg" alt=""></div>
                                            <div><img src="../img/5.jpeg" alt=""></div>
                                        </div>
                                </div>
                        </div>
                    </div>
        
                </div>
        
            </div>
</body>
<script src="../layui/layui.all.js"></script>
<script>
(function(){
    var carousel = layui.carousel;
    //建造实例
    carousel.render({
        elem: '#test1'
        ,width: '600px' //设置容器宽度
        ,height: '400px'
        ,interval:1000
        ,arrow: 'always' //始终显示箭头
        ,anim: 'fade' //切换动画方式
    });
})();
</script>
</html>